package org.ufba.buscador.parser;

import java.util.ArrayList;

public class QuestionSemanticInfo {

	private String text;
	private String questionExpression;
	private int semantic;
	private int time;
	private String predicate;
	
	public QuestionSemanticInfo(
		String text, 
		String questionExpression, 
		int semantic, 
		int time, 
		String predicate)
	{
		this.text = text;
		this.questionExpression = questionExpression;
		this.semantic = semantic;
		this.time = time;
		this.predicate = predicate;
	}

	// --------------------------------------------------------
	
	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getQuestionExpression() {
		return questionExpression;
	}

	public void setQuestionExpression(String questionExpression) {
		this.questionExpression = questionExpression;
	}

	public int getSemantic() {
		return semantic;
	}

	public void setSemantic(int semantic) {
		this.semantic = semantic;
	}

	public int getTime() {
		return time;
	}

	public void setTime(int time) {
		this.time = time;
	}

	public String getPredicate() {
		return predicate;
	}

	public void setPredicate(String predicate) {
		this.predicate = predicate;
	}
	
	public String describeSemantic(int semantic)
	{
		switch (semantic) {
			case SemanticMetadata.SEMANTIC_DEFINITION:
				return "definicao";
			case SemanticMetadata.SEMANTIC_LIST:
				return "listagem";
			case SemanticMetadata.SEMANTIC_MONEY:
				return "dinheiro";
			case SemanticMetadata.SEMANTIC_PERSON:
				return "pessoa";
			case SemanticMetadata.SEMANTIC_PLACE:
				return "lugar";
			case SemanticMetadata.SEMANTIC_QUANTITY:
				return "quantidade";
			case SemanticMetadata.SEMANTIC_TIME:
				return "tempo";
		}
		
		return "";
	}
	
	public String describeTime(int time)
	{
		switch (time) {
			case SemanticMetadata.TIME_PAST:
				return "passado";		
			case SemanticMetadata.TIME_FUTURE:
				return "futuro";
			case SemanticMetadata.TIME_PRESENT:
				return "presente";
		}
		
		return "";
	}
	
	public String toString()
	{
		return "[text: \"" + text + "\", question expression: \"" + questionExpression + "\", semantic: \"" +
				describeSemantic(semantic) + "\", time: \"" + describeTime(time) + "\", predicate: \"" + predicate + "\"]";
	}
	

}